module.exports = {
  apps: [{
    name: 'Today-News',
    script: './dist/server.js',
    instances: 'max',
    exec_mode: 'cluster',
    env: {
      NODE_ENV: 'development',
      DOTENV_CONFIG_PATH: ".env"
    },
    env_production: {
      NODE_ENV: 'production',
      DOTENV_CONFIG_PATH: ".env.production"
    },
    watch: false,
    max_memory_restart: '1G',
    cron_restart: '0 3 * * *', // 每天凌晨3点重启
    out_file: './logs/out.log',
    error_file: './logs/error.log',
    log_file: './logs/combined.log',
    time: true
  }]
};